package com.acme.bankapp.service.bank;


import java.util.ArrayList;
import com.acme.bankapp.domain.bank.*;


public class BankService {
	public void addClient(Bank bank, Client client) throws ClintExistsException{
		ArrayList<Client> cl=bank.getClients();
		for(Client c: cl){
			if(c.getName().equals(client.getName())){
				throw new ClintExistsException(c.getName());
			}				
		}
		bank.addClienT(client);
	}
	
	public void printMaximumAmountToWithdraw(Bank bank, Client cl){
		System.out.println("Maximum posible means = " + cl.getAccount().maximumAmountToWithdraw());
	}
}
